home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 3 / Cream of the Crop 3.iso / clipper / ks94an.zip / BTOI.HDR < prev    next >
Text File  |  1994-04-25  |  1KB  |  46 lines

  1. /******************************************************************************
  2.                  The Klipper Library, for CA-Clipper 5.x
  3.         Copyright (c), 1994, Wallace Information Systems Engineering
  4.  
  5. FUNCTION:
  6.  
  7. _BtoI( xIn_Var ) --> nInteger
  8.  
  9. PARAMETERS:
  10.  
  11. xIn_Var : Binary number in either numeric or string format to convert
  12.  
  13. SHORT:
  14.  
  15. Convert Binary to Decimal Integer.
  16.  
  17. DESCRIPTION:
  18.  
  19. _BtoI() accepts either a numeric or a string representation of a binary
  20. number and returns an integer representing the decimal equivalent.  If
  21. the significant digits of the binary number exceed 16, you should pass
  22. the binary number as a string to avoid loss of digits during the
  23. parameter pass.  _btoi() detects which mode the number was passed in
  24. and adjusts accordingly.  In either case, the decimal return value is
  25. always numeric.
  26.  
  27. The maximum NUMERIC value that can be converted is 1111111111111111
  28. (2^15) because anything larger than that is lost when the parameter is
  29. passed as a numeric.  Pass the number as a string for binary values
  30. greater than 16 digits.
  31.  
  32. Binary points are supported.
  33.  
  34. NOTE:
  35.  
  36. This function is equivalent to using _BX2BY() or _BasX2Dec() to accomplish
  37. the same thing.  The syntax of this one is geared specifically to the Bin to
  38. Dec conversion.
  39.  
  40. EXAMPLE:
  41.  
  42. _BtoI(1101)      // returns 13
  43. _BtoI('1101')    // returns 13
  44.  
  45. ******************************************************************************/
  46.